import request from "@/utils/request";

// 获取系统协议列表
export function getAgreementApi(query) {
  return request({
    url: "/system/agreement/list",
    method: "get",
    params: query,
  });
}

// 新增系统协议
export function addAgreementApi(data) {
  return request({
    url: "/system/agreement/add",
    method: "post",
    data: data,
  });
}

// 根据系统协议id获取详细信息
export function getAgreementByIdApi(postId) {
  return request({
    url: "/system/agreement/" + postId,
    method: "get",
  });
}

// 修改系统协议
export function updateAgreementApi(data) {
  return request({
    url: "/system/agreement/edit",
    method: "put",
    data: data,
  });
}

// 删除系统协议
export function delAgreementApi(postId) {
  return request({
    url: "/system/agreement/remove/" + postId,
    method: "delete",
  });
}
